from ronglian_sms_sdk import SmsSDK
from djangoProject09.settings import RONG_LIAN_YUN
import json
accId = RONG_LIAN_YUN['accId']
accToken = RONG_LIAN_YUN['accToken']
appId = RONG_LIAN_YUN['appId']
def send_message(tid, phone, content):
    sdk = SmsSDK(accId, accToken, appId)
    resp = sdk.sendMessage(tid, phone, content)
    res = json.loads(resp)
    print("---------- send message end ----------")
    if res['statusCode'] == '000000':
        return True

